package com.cn.file;

import com.cn.msg.Message;

import java.nio.ByteBuffer;

/**
 * 消息存储接口
 */
public interface AppendMessageCallback {

    /**
     * After message serialization, write MapedByteBuffer
     *
     * @return How many bytes to write
     */
    AppendMessageResult doAppend(final long fileFromOffset, final ByteBuffer byteBuffer,
                                 final int maxBlank, MessageStore msg);

}
